package com.mapper;

import com.pojo.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysUserMapper {
    /**
     * 根据账号名称获取用户信息
     * @param account
     * @return
     */
    SysUser getByAccount(String account);

    int add(SysUser sysUser);

    List<SysUser> getUserList(@Param("realName")String queryRealName, @Param("roleName")String queryRoleName,
                              @Param("pageBegin")Integer pageBegin, @Param("pageSize")Integer pageSize);

    int count(@Param("realName")String queryRealName, @Param("roleName")String queryRoleName);

    int getUpdatePwd(int id, String newPassword);

    int checkOldPwd(int id,String oldPassword);

    SysUser getUserById(String id);

    int del(String id);

    SysUser getListById(@Param("id")int id,@Param("account") String account);
}
